package model

import (
	"time"

	"gorm.io/gorm"
)

type ChatLog struct {
	gorm.Model
	GroupID  int64  `gorm:"index;comment:群号"`
	UserID   int64  `gorm:"index;comment:Q号"`
	Username string `gorm:"comment:Q昵称"`
	Message  string `gorm:"type:text;comment:信息"`
	AddTime  time.Time
}

func AddLog(data *ChatLog) {
	mysqlDb.Create(&data)
}
